/******************************************************************************

	COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2010.

	This file is part of Maxsi Installer.

	Maxsi Installer is free software: you can redistribute it and/or modify it
	under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or (at your
	option) any later version.

	Maxsi Installer is distributed in the hope that it will be useful, but
	WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
	or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
	License for more details.

	You should have received a copy of the GNU Lesser General Public License
	along with Maxsi Installer. If not, see <http://www.gnu.org/licenses/>.

	Maxsi Installer
	An installer that downloads and sets up software, data, and games.

	UI.h
	Defines a page system that extends the Maxsi Window System.

******************************************************************************/

#ifndef UI_H
#define UI_H

class Page
{
public:
	MaxsiWindow*	Window;

public:
	Page();
	virtual ~Page();

public:
	virtual void SetWindow(MaxsiWindow* NewWindow);
	virtual void DestroyPage();
	virtual MaxsiError SetReplacement(Page* Replacement);

public:
	virtual MaxsiError CreateControls() = 0;
	virtual MaxsiError DeleteControls() = 0;
	virtual MaxsiError OnEvent(MaxsiWindowEvent* Event) = 0;
};

extern MaxsiWindowSystem*	WindowSystem;
extern MaxsiWindow*			MainWindow;
extern Page*				CurrentPage;
extern bool					ShouldDestroyPage;
extern Page*				NextPage;

#endif
